<template>
  <div style="min-height: 300px">
    <table class="mytable" style="width: 70%;margin-bottom: 20px">
      <tr>
        <td>派工人</td>
        <td>常乐</td>
        <td>贸易号</td>
        <td>贸2025-001</td>
      </tr>
      <tr>
        <td>任务通知单号</td>
        <td>2025-BC-0001</td>
        <td>产品标识号</td>
        <td>H13-250011</td>
      </tr>
      <tr>
        <td>报工工序</td>
        <td colspan="3">下料</td>
      </tr>
    </table>

    <a-form :model="entity" :rules="rules" label-width="120px">
      <a-form-item label="报工人" field="createUser">
        <a-input v-model="entity.createUser"  />
      </a-form-item>
      <a-form-item label="加工设备" field="shebei">
        <a-select v-model="entity.shebei" placeholder="Please select ..." allow-clear>
          <a-option value="1">设备1</a-option>
          <a-option value="2">设备2</a-option>
        </a-select>
      </a-form-item>
      <a-form-item label="合格产量" field="chanlian">
        <a-input v-model="entity.chanlian"  />
      </a-form-item>
      <a-form-item label="余料产量" field="yuliao">
        <a-input v-model="entity.yuliao"  />
      </a-form-item>
      <a-form-item label="源材料编码" field="ycl">
        <a-input v-model="entity.ycl"  />
      </a-form-item>
      <a-form-item label="自定义项1" field="cdefine1">
        <a-input v-model="entity.cdefine1"  />
      </a-form-item>
      <a-form-item label="自定义项2" field="cdefine2">
        <a-input v-model="entity.cdefine2"  />
      </a-form-item>

<!--      <h4>批次号拆分</h4>-->
<!--      <a-form-item label="产品标识号1">-->
<!--        <a-input   />-->
<!--      </a-form-item>-->
<!--      <a-form-item label="产品标识号2">-->
<!--        <a-input   />-->
<!--      </a-form-item>-->
<!--      <a-form-item label="产品标识号3">-->
<!--        <a-input   />-->
<!--      </a-form-item>-->
<!--      <a-form-item label="产品标识号4">-->
<!--        <a-input   />-->
<!--      </a-form-item>-->
      <a-form-item>
        <a-space>
          <a-button type="primary" @click="">确 定</a-button>
        </a-space>
      </a-form-item>
    </a-form>
  </div>
</template>

<script lang="ts" setup>
import {reactive, ref, onMounted, defineProps, defineEmits, nextTick} from "vue";

const emit = defineEmits(['update:modelValue'])
let props = defineProps({
  modelValue : {type : Boolean, default: true},
  entityId : {type : Number, default: 0}
})

let entity = ref({
  id : props.entityId,
  createUser:'',
  shebei:'',
  chanlian: '',
  yuliao: '',
  ycl: '',
  cdefine1: '',
  cdefine2: '',
})
const rules = reactive({
  createUser: [
    { required: true, message: '请输入报工人', trigger: 'blur' },
  ],
  chanlian: [
    { required: true, message: '请输入合格产量', trigger: 'blur' },
  ],
  yuliao: [
    { required: true, message: '请输入余料', trigger: 'blur' },
  ],
})

onMounted(()=>{
  nextTick(()=>{
  })
})
</script>

<style scoped>

</style>
